package router

import (
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/net/ghttp"
)

// renderTpl 统一的模板渲染函数
func renderTpl(r *ghttp.Request, tplPath string) {
	url := r.URL.Path
	r.Response.WriteTpl(tplPath, g.Map{
		"func_url": url,
	})
}

var Index = index{}

type index struct{}

func (*index) Index(r *ghttp.Request) {
	renderTpl(r, "/Index.html")
}
